<?php $count = count($this->topList);?>
<?php $semesters = new Semester_Model_SemesterDuration();
$semesterArr = $semesters->getAllYearSemester();
?>
<style>
#listTable {width:600px; margin:10px auto; border: #000 solid 2px; border-collapse:collapse; text-align:center;}
#listTable caption {font-weight: bold; font-size:large; margin:5px}
#listTable td , #listTable th {border: #000 solid 1px}
</style>
<table id="listTable">
<caption><?php echo $this->School['name']?> <?php echo $semesterArr[$this->yearSemester]?>
<?php if ($this->stage == 255) echo $this->translate('whole stage score') ; else echo sprintf($this->translate('%dth stage'), $this->stage)?>
<?php echo $this->translate('group rate list')?>
</caption>
<thead>
<tr>
<th><?php echo $this->translate('rate')?></th>
<th><?php echo $this->translate('score')?></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><?php echo $this->topList[0]['score']?></td>
</tr>
<?php for($i=1; $i <= 5; $i++):?>
<?php if ($i*20 > $count) break;?>
<tr>
<td><?php echo $i*20?></td>
<td><?php echo $this->topList[$i*20]['score']?></td>
</tr>
<?php endfor?>
<?php for($i=3; $i <= 10; $i++):?>
<?php if ($i*50 > $count) break;?>
<tr>
<td><?php echo $i*50?></td>
<td><?php echo $this->topList[$i*50]['score']?></td>
</tr>
<?php endfor?>



</tbody>
</table>
